package hmis.pos.Service;

import hmis.pos.Base.BaseService.BaseService;
import hmis.pos.Common.pojo.ApiResponse;
import hmis.pos.Common.vo.Order.OrderAndOrderDetail;
import hmis.pos.Common.vo.Order.OrderAndTypeAndNumber;
import hmis.pos.Entity.Order;

import java.util.Date;
import java.util.List;

public interface OrderService extends BaseService<Order> {

    //保存订单
    Order save(OrderAndTypeAndNumber orderAndTypeAndNumber);

    //保存支付信息
    Order savePayMessage(Order order);

    //查找所有订单以及相应的订单详情
    List<OrderAndOrderDetail> findAllOrder();

    //更新订单信息
    ApiResponse<OrderAndOrderDetail> renew(Order order);

    //查询今天需要安排的订单
    List<OrderAndOrderDetail> findByToday(Date today);

    //查询今天创建
    List<OrderAndOrderDetail> findByToday2();

    //根据状态查询订单
    List<OrderAndOrderDetail> findByStatus(String status);

    //取消订单
    ApiResponse<Order> cancel(Order order);

    //查找今年的数据
    List<OrderAndOrderDetail> findByYear();

    //查找这个月的数据
    List<OrderAndOrderDetail> findByMonth();

    //一周内的数据
    List<OrderAndOrderDetail> findByWeek();

}
